import { config } from '@/config'
import type { Entity } from './types'

export async function requestModel(type: string): Promise<Entity[]> {
  const url = `${config.baseApiPath}/model/${type}`
  const resp = await fetch(url)
  if (resp.status >= 200 && resp.status < 300) {
    return resp.json()
  }
  throw Error('todo')
}
